package com.example.demodao.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 *
 * </p>
 *
 * @author rosszhang
 * @since 2023-01-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "TbCart对象", description = "")
public class TbCart implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键Id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品清单  ")
    private List<TbItem> items = new ArrayList<>();

    @ApiModelProperty(value = "总优惠 ")
    @TableField("totalDiscount")
    private BigDecimal totalDiscount;

    @ApiModelProperty(value = "商品总价 ")
    @TableField("totalItemPrice")
    private BigDecimal totalItemPrice;

    @ApiModelProperty(value = "总运费  ")
    @TableField("totalDeliveryPrice")
    private BigDecimal totalDeliveryPrice;

    @ApiModelProperty(value = "应付总价  ")
    @TableField("payPrice")
    private BigDecimal payPrice;


}
